﻿<UserControl x:Class="PatternLocker.Controls.PatternDot"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:conv="clr-namespace:PatternLocker.Converters" 
             xmlns:core="clr-namespace:System;assembly=mscorlib" 
             xmlns:primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=PresentationFramework" 
             xmlns:uctl="clr-namespace:PatternLocker.Controls"
             mc:Ignorable="d" Background="Transparent">
    <UserControl.Resources>
        <conv:InnerCircleSizeConverter x:Key="InnerCircleSizeConverter" />
        <conv:VisibilityConverter x:Key="VisibilityConverter" />
        <core:Double x:Key="CircleSize">100</core:Double>
    </UserControl.Resources>

    <Grid Background="Transparent">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Border Name="brdrOuterCircle" BorderThickness="10" BorderBrush="GreenYellow" CornerRadius="50" 
                Height="{StaticResource CircleSize}" Width="{StaticResource CircleSize}"
                Visibility="Visible" Grid.Column="0">
            <Border Name="brdrMidCircle" BorderThickness="25" BorderBrush="Black" 
                    CornerRadius="{Binding ElementName=brdrOuterCircle, Path=CornerRadius}">
                <Grid Margin="-25" Background="Transparent">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <uctl:DirectionButton Direction="Top" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" />
                    <uctl:DirectionButton Direction="Bottom" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" />
                    <uctl:DirectionButton Direction="Left" Grid.Row="1" Grid.Column="0" Grid.RowSpan="2" />
                    <uctl:DirectionButton Direction="Right" Grid.Row="1" Grid.Column="3" Grid.RowSpan="2" />
                    <uctl:CircularButton x:Name="circMid" Margin="5" Grid.Row="1" Grid.Column="1" 
                                         Grid.RowSpan="2" Grid.ColumnSpan="2" FillColour="GreenYellow" />
                </Grid>
            </Border>
        </Border>
    </Grid>
</UserControl>
